$(function () {
    getHomeData();
});

function getHomeData() {
    let data = myFrontAjax("/home");
    console.log(data,"home");
    setProductData(data.productModelList);
}



function setProductData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '<div>\n' +
            '                    <div><img src="' + data[i].imgHref + '" height="300" width="300"/></div>\n' +
            '                    <div>\n' +
            '                        <div>' + data[i].name + '</div>\n' +
            '                        <div>' + data[i].content + '</div>\n' +
            '                    </div>\n' +
            '                </div>';

    }
    $("#productBody").html(html);
}